########### Syntax for queries ###########
# modified http://www.rodriguez-muro.com/courses/index.php?title=KRO11_Project_QInput
#
#QUERY ::= HEAD ' :- ' BODY
#HEAD ::= ATOM
#BODY ::= ATOM ("," ATOM)*
#ATOM ::= PREDICATE "(" TERM (", " TERM)* ")"
#TERM ::= VARIABLE | OBJECTCONSTANT | DATACONSTANT
#VAR ::= "?" a string identifying a variable name
#OBJECTCONSTANT ::= a string identifying an object constant
#DATACONSTANT ::= " " " a string identifying a data constant " " "

# This is a comment. 
# This query has 3 atoms, it mentions 2 different variables, 1 object constant and 1 data constant.
#q(?x,?y):-hasFather(?x,John),name(?x, "Mary"),hasBrother(?x,?x)
#q(x,y):-hasFather(x,John),name(x,'Mary'),hasBrother(x,x)
#q(x,y):-hasFather(x,John),name(x,Mary),hasBrother(x,x)
q(x):-P(x,y),A1(x),A(x),A(r),A(2)